In the context of digital image processing, a clear image would generally mean that features of the image can clearly be identified or interpreted. Contrast enhancement is typically used for improving the interpretation of features of an image. However, as opposed to other imaging controls, such as exposure control, the control of contrast is difficult due to its nonlinear transform function characteristic.
Histogram modification is often called for in contrast enhancement of an image. A histogram of an image provides pixel intensity of brightness for analyzing the lightness or darkness characteristic of the image. The histogram is a graph showing population of pixels at each grayscale value within the image. For an 8-bit grayscale image, for example, there are 256 different possible intensities, and thus, the histogram of that 8-bit image may show pixel distributions amongst the 256 levels of grayscale values. Similarly, for color images, the histogram may be provided by three individual histograms of red, green and blue channels.
Depending upon the implementation, the output of a processed histogram may be a processed image of the histogram, or a data file representing the histogram statistics.
Before natural video from a broadcast, video CD and DVD source is displayed at the consumer end on a TV or other display device, the video can undergo several non-linear processes that include analog to digital and digital to analog conversions, sensor circuitry, transmission attenuation and amplification, and digital encoding and decoding. As a result, the dynamics of the video frames/streams are distorted and the visual quality of the picture in terms of contrast is reduced. Thus, there is a need to reverse the changes and restore visual attractiveness.
One common method is to provide an adjustable contrast feature on a display device, where the adjustable contrast feature allows manual adjustment of the contrast by stretching the dynamic range of the video with clamping at black level. Problems with this method are that the contrast adjustment is manual so as not be able to adapt to the nature of the source, and that the dynamic stretching characteristics are fixed so as not be suitable for all pictures.
Histogram equalization is a method employed in image processing to improve the contrast of images by flattening the distribution density in the histogram of an image. However, such a method targets an output at middle gray level regardless of the brightness of the input image, which makes dark images too bright with a white-wash effect and bright pictures too dark or overly contrasted, such that the enhancement makes the picture unnatural or the interpretation of image content is altered. This brings about serious consequences in motion images, i.e. video, when a day scene moves to a night scene and vice versa.
It is known to use a dual segment transfer function with a lower segment gain adjusted by dark sample distribution, an upper segment gain adjusted by frame or field peak, and an adaptive pivot point that separates the two segments adjusted by the image brightness.
Further, there is known a contrast enhancement transform made up of two independent transform functions, one with levels less or equal to mean level and the other with levels greater or equal to the mean. In addition, the individual transform functions are constructed in dependence on the distribution of samples in their respective regions.
The above two methods perform picture and histogram analysis and adjust contrast gain automatically according to parameters not limited to but including picture brightness, sample distribution, frame/field peak. However, these methods have a limitation on correcting over-contrasted pictures.
FIG. 11 shows an existing contrast improvement method by gathering pictures of sequence into histogram, equalizing histogram class peaks by redistributing histogram values above pre-determined limit to neighboring class, temporally filtering processed histogram recursively to preserve edges, and transforming the histogram to mapping function for altering picture contrast. See, Nenonen, EP 0856813.
There is yet another image enhancement method by obtaining the histogram of a picture with quantized input pixel values, calculating the cumulative density function, and interpolating the latter as a transform function. The method further describes the control of the transform function such that the mean level of the histogram can be mapped to itself.
These two methods retain the mean brightness of the picture by controlling the transform function such that the mean brightness mapped onto itself. The mean brightness is sometimes not the same as the perceived brightness. The change in overall brightness impression is acceptable in still pictures but in video sequences with fading transitions there might be an inversion in the lighting condition in consecutive pictures.
The histogram processing techniques suffer from over-compensating contrast such that some mid-contrasted pictures may become over-contrasted after contrast enhancement. The cumulative density function may result in steep slopes on the transfer curve that produces artifacts including a relatively unrealistic picture with the extremes of dark and bright and loss of desirable details as a result of that overstretched contrast, and unnatural picture with over-expansion of undesired details as a result of overstretching of certain gray levels.
In addition, in pictures with good contrast and a large portion of near black/white background, good contrasted features may be compressed. Picture blurring may occur as a result of reduced gray level difference between a dominant region and neighboring minor regions from the compression of certain gray level ranges.
Last but not least, temporal consistency can sometimes be a problem in contrast enhancement with automatic gain control. Slight changes in pictures may have different contrast enhancement effects and this may cause flicker in moving pictures. Solutions like recursive temporal filtering in one of the above methods reduce the flicker but do not respond to scene change in video sequences.